#ifndef VXSYMBOLSEXPLORER_H
#define VXSYMBOLSEXPLORER_H

#include <QtGui>

#include "../Controllers/vxhandcontroller.h"
#include "../Controllers/vxzoomcontroller.h"
#include "../Font/vxfont.h"

class VxSymbolsExplorer : public QFrame
{
	Q_OBJECT

public:
	typedef QVector<QPainterPath *> VectorPathes;

	VxSymbolsExplorer(QWidget * parent=0);


	QSize sizeHint() const
	{
		return QSize(0, 50);
	}

	QSize sizeIncrement()
	{
		return QSize(0,50);
	}


	QGraphicsView * view(){	return _view; };
	VxSymbols * symbols(){		return _symbols;};

protected:
	bool eventFilter(QObject *, QEvent *);

private:
	int _ordx0;
	int _ordx1;
	int _ordy;
	bool _vscrolling;
	QSize _cellSize;

	QVector<QGraphicsItem *> _items;
	QGraphicsView * _view;
	VxSymbols * _symbols;
	void _createControls();
	VectorPathes * _pathes;

	void _rescale();

	void _outCurrentChars(int ordx0, int ordx1, int ordy,  bool current);
	void _checkCurrentChars();
	void _clearScene();


private slots:
	void _beforeVScrolling();
	void _finishedVScrolling();
	void _beforeZooming();

};

#endif // VXSYMBOLSEXPLORER_H
